//
//  UIWebView+JavaScript.h
//  yunlehui
//
//  Created by saxon on 15/9/20.
//  Copyright (c) 2015年 saxon. All rights reserved.
//

#import <UIKit/UIKit.h>


@protocol UIWebViewJavaScriptDelegate <NSObject>

-(void)webView:(UIWebView *)sender runJavaScriptAlertMessage:(NSDictionary *)message;

@end


@interface UIWebView (JavaScript)

@property (nonatomic, weak) id<UIWebViewJavaScriptDelegate> jsDelegate;

-(void)webView:(UIWebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(id)frame;

-(BOOL)webView:(UIWebView *)sender runJavaScriptConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(id)frame;
@end
